package com.eqxiu.ieditor.dto;

import java.io.Serializable;
import java.util.Date;

/**
 * @param
 * @author libin
 * @description
 * @date 11:23 2018/1/19
 * @return
 */
public class MallUserDTO implements Serializable {
	private static final long serialVersionUID = 4286248194896045829L;

	private String id;

	private String password;

	private String loginName;

	/**
	 * 1：普通账号 2：企业账号 3：高级账户 4：服务账号 21：企业子账号 99：运维账号
	 */
	private byte type;

	/**
	 * 1：正常状态 2：关闭状态 3：删除状态 4：冻结状态
	 */
	private int status;

	private String name;

	private String email;

	private Date regTime;

	private String phone;

	private String headImg;

	private Integer checkEmail;

	private Integer checkPhone;

	/**
	 * 1：安全等级-低 2：安全等级-中 3：安全等级-高
	 */
	private Integer securityLevel;

	/**
	 * 语言
	 */
	private String lang;

	/**
	 * 昵称
	 */
	private String nick;

	private String beta;

	private String memberType;

	public boolean available() {
		return status == 1 || status == 0;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public byte getType() {
		return type;
	}

	public void setType(byte type) {
		this.type = type;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getRegTime() {
		return regTime;
	}

	public void setRegTime(Date regTime) {
		this.regTime = regTime;
	}

	public String getLang() {
		return lang;
	}

	public void setLang(String lang) {
		this.lang = lang;
	}

	public Integer getCheckEmail() {
		// 兼容老数据
		if (checkEmail == null || checkEmail != 1) {
			this.setCheckEmail(0);
		}
		return checkEmail;
	}

	public void setCheckEmail(Integer checkEmail) {
		this.checkEmail = checkEmail;
	}

	public Integer getCheckPhone() {
		// 兼容老数据
		if (checkPhone == null || checkPhone != 1) {
			this.setCheckPhone(0);
		}
		return checkPhone;
	}

	public void setCheckPhone(Integer checkPhone) {
		this.checkPhone = checkPhone;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	public Integer getSecurityLevel() {
		return securityLevel;
	}

	public void setSecurityLevel(Integer securityLevel) {
		this.securityLevel = securityLevel;
	}

	public String getNick() {
		return name;
	}

	public void setNick(String nick) {
		this.name = nick;
	}

	public String getBeta() {
		return beta;
	}

	public void setBeta(String beta) {
		this.beta = beta;
	}

	public String getMemberType() {
		return memberType;
	}

	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}

	@Override
	public String toString() {
		return "id: [ " + id + "],loginName : [" + loginName + "],name: [" + name + "],phone : [" + phone + "],beta : ["
				+ beta + "],memberType : [" + memberType + "]";
	}
}
